<!DOCTYPE html>
<html>
<head>
<?php include 'comm/head.php';?>
<link href="<?php echo $this->config->item('static_url'); ?>css/index.css" rel="stylesheet" type="text/css" media="all" />
</head>
<body id="aisn-home">
	<div id="homepage-box">
		<div class="page clearfix">
			<?php include 'comm/header.php';?>
			<div class="col-sub">
				<div class="cate-wrap J-lazy-f">
					<h3><a href="<?php echo $this->config->base_url('channel'); ?>">Categories</a></h3>
					<?php include 'comm/channel_menu.php';?>
				</div>
			</div>
			<div class="col-main">
				<div id="b-sec-1" class="lead-sec J-lazy-f J-tab">
<!--[if IE 6]><script>document.execCommand("BackgroundImageCache", false, true);</script><![endif]-->
					<div id="service-entry">
						<div id="tab-container" class="user-guide-buyer">
							<a href="javascript:void(0)" id="tab-buyer">提供精神的粮食</a>
						</div>
						<div id="content-buyer">
							<span class="buyer-title">知识服务</span>
							<ul>
								<li class="buyer-service buyer-service-cs"><a
									href=""
									target="_blank" rel="nofollow">海量的知识</a></li>
								<li class="buyer-service buyer-service-sa"><a
									href=""
									target="_blank" rel="nofollow">助您更上一层楼</a></li>
								<li class="buyer-service buyer-service-es"><a
									href=""
									target="_blank" rel="nofollow">为您遮风挡雨</a></li>
								<li class="buyer-service buyer-service-is"><a
									href=""
									target="_blank" rel="nofollow">仔细为您搜索</a></li>
								<li class="buyer-service buyer-service-bg">&nbsp;</li>
								<li class="buyer-service buyer-service-qg">
                                	<?php if(empty($user_login)) {
                                    	 echo '<a href="'.$this->config->base_url('user/mydocs/upload').'" target="_blank" rel="nofollow">上传文档</a> | 
										       <a href="'.$this->config->base_url().'register.html" target="_blank" rel="nofollow">免费注册</a>';
										 } else { 
                                    	 echo '<a href="'.$this->config->base_url('user/home').'" target="_blank" rel="nofollow">用户中心</a> | 
										       <a href="'.$this->config->base_url('user/mydocs/upload').'" target="_blank" rel="nofollow">上传文档</a>';
                                         } ?>
								</li>
							</ul>
						</div>
					</div>
					<div class="lead-sec-l" id="lead-sec-l">
						<ul class="J-cons cons">
							<li class="lead-slide" id="lead-buyer">
                            
                            <?php if(!empty($marketing)) {
									$arrValue = explode("\n", $marketing['value1']);
									foreach($arrValue as $k=>$v) {
										$arrV = explode('|', trim($v));
									   echo '<a style="position:absolute; z-index:0;" class="J-item lead-item" target="_blank" href="'.$arrV[1].'" title="'
									   .$arrV[0].'"><img style="position:absolute; z-index:1;left: 0px;" src="'.$arrV[2].'" /></a>';
									}
								  }
							?>
							 <!--<a target="_blank" href="javascript:void(0)" class="J-prev prev"><span> </span>prev</a> 
                             <a target="_blank" href="javascript:void(0)" class="J-next next"><span> </span>next</a>-->
							</li>
						</ul>
						<div id="auto-tabs-wrap">
                        	<?php if(!empty($marketing)) {
									$arrValue = explode("\n", $marketing['value1']);
									foreach($arrValue as $k=>$v) {
										$arrV = explode('|', trim($v));
									   	echo '<a href="javascript:void(0);">'.$arrV[0].'<span class="arrow-o"></span><span class="arrow-i"></span></a>';
									}
								  }
							?>
						</div>
                        <script language="javascript">
							var is_block = 0;
							var a = $('#auto-tabs-wrap a');
							var banner = $(".J-item");
							var bannerfocus = setInterval("setfocus()", 2500);
							setfocus();
							function setfocus(obj) {
								if(typeof(obj) !== 'undefined') is_block = -9999;
								a.each(function(index, domEle){
									if(index == is_block || obj == domEle) {
										banner.eq(index).fadeIn("slow");
										$(this).addClass('current');
									} else {
										banner.eq(index).fadeOut("slow");
										$(this).removeClass('current');
									}
								 });
								 is_block++;
								 if(is_block >= <?php echo count($arrValue);?>) is_block = 0;
							}
							a.bind('mouseover', function(){clearInterval(bannerfocus);setfocus(this);})
							a.bind('mouseout', function(){is_block = 0;bannerfocus = setInterval("setfocus()", 2500);})
							//style="background-image: url(\''.$arrV[2].'\');"
						</script>
					</div>
				</div>

				<div id="b-sec-2" class="promotion-sec J-lazy-f">
					<ul class="J-cons cons">
                     <?php if(isset($marketing['value2']) && !empty($marketing['value2'])) {
								$arrValue = explode("\n", $marketing['value2']);
								foreach($arrValue as $k=>$v) {
									$arrV = explode('|', trim($v));
								   echo '<li class="banner_long"><a target="_blank" style="background-image: url(\''.$arrV[2].'\');" href="'.$arrV[1].'"> </a></li>';
								}
						   }
					?>
					</ul>
					<ul class="J-tabs hp-tabs">
                    	<?php if(isset($marketing['value2']) && !empty($marketing['value2'])) {
								$arrValue = explode("\n", $marketing['value2']);
								foreach($arrValue as $k => $v) {
									$arrV = explode('|', trim($v));
								    echo '<li>'.$arrV[0].'<span class="arrow-o"></span><span class="arrow-i"></span></li>';
								}
						   }
						?>
					</ul>
                    <script language="javascript">
							var bannerTxt = $(".J-tabs li");
							var banner_long = $(".banner_long");
							function setbannerTxt(obj) {
								bannerTxt.each(function(index, domEle){
									if(obj == domEle) {
										banner_long.eq(index).show("slow");
										$(this).addClass('current');
									} else {
										banner_long.eq(index).hide("slow");
										$(this).removeClass('current');
									}
								 });
							}
							bannerTxt.eq(0).addClass('current');
							bannerTxt.bind('mouseover', function(){setbannerTxt(this);})
					</script>
				</div>


				<div class="hp-sec bb-sec J-lazy">
					<h2>最新精选</h2>
					<span class="sec-des">Now,knowledge made easy!</span>
                    <ul class="sec-con clearfix">
                    <?php if(isset($recommend['value1']) && !empty($recommend['value1'])) {
								$arrValue = explode("\n", $recommend['value1']);
								$num = count($arrValue) - 1;
								foreach($arrValue as $k=>$v) {
									$arrV = explode('|', trim($v));
					?>
                    
						<li class="bb-item<?php if($num == $k) echo ' last'; ?>">
                        	<a title="<?php echo $arrV[0];?>"	href="<?php echo $arrV[1];?>" class="bb-img" style="background-image: url('<?php echo $arrV[2];?>');"></a>
							<a title="<?php echo $arrV[0];?>" class="bb-pn" href="<?php echo $arrV[1];?>"><?php echo $arrV[0];?></a>
							<!--<div class="bb-bp t-weak">
								Price: <span class="price">US $189.00</span>
							</div>
							<div class="bb-pr t-weaker">
								MOQ: <span class="profit">1 Pieces</span>
							</div>-->
							<div class="bb-cn">
								<a title="阅读" href="<?php echo $arrV[1];?>">点击阅读</a>
								<span class="arrow-o"></span><span class="arrow-i"></span>
							</div>
						</li>
                    <?php
								}
						   }
					?>
					</ul>
				</div>

				<div class="hp-sec gsd-sec J-lazy">
					<h2>阅读最多</h2>
					<span class="sec-des">Top reading</span>
					<div class="sec-con clearfix">

						<div class="hot-regions clearfix" id="hot-regions">
							<ul class="hr-flags clearfix">
								<li><a href="http://www.alibaba.com/countrysearch/CN-China.html"
									class="hr-flag"
									data-src="http://img.alibaba.com/simg/single/flag/cn.png">China</a>
								</li>
							</ul>
							<div class="hr-current">
								<div class="hr-title"></div>
								
								<div class="hr-current-country J-current"></div>
								
							</div>
						</div>

						<ul class="gsd-items clearfix">
                        	<?php if(isset($recommend['value2']) && !empty($recommend['value2'])) {
								$arrValue = explode("\n", $recommend['value2']);
								foreach($arrValue as $k=>$v) {
									$arrV = explode('|', trim($v));
							?>
							<li class="gsd-item"><a title="<?php echo $arrV[0];?>" href="<?php echo $arrV[1];?>" class="gsd-item-left" style="background-image: url('<?php echo $arrV[2];?>');"></a>
								<div class="gsd-item-right">
									<a title="<?php echo $arrV[0];?>" class="gsd-item-cat" href="<?php echo $arrV[1];?>"><?php echo $arrV[0];?></a> 
                                    <span class="gsd-item-name"><strong>sss</strong>
									</span> <span class="gsd-item-sp">sss</span>
								</div>
							</li>
                            <?php
										}
								   }
							?>
							
						</ul>
					</div>
				</div>

			</div>

			<div class="section-seprator">&nbsp;</div>
			<div id="recommend-products" class="rp"></div>
			<div id="sponsor-products" class="clearfix">
			</div>
		</div>
	</div>
<?php include 'comm/footer.php';?>
</body>

</html>
